[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setwritemode()          Set Write Mode for Line Drawing

 #include   <graphics.h>

 void far setwritemode(mode);
 int mode;               Mode to set

        This function sets the writing mode for line drawing. If mode is 0,
        lines overwrite the screen's current contents. On the other hand,
        If mode is 1, an exclusive OR (XOR) is done.

    Returns:    Nothing.

   -------------------------------- Example ---------------------------------

        The following statements select the XOR method of drawing a line,
        and draw a line from (0, 0) to (100, 100).

     #include <graphics.h>
     #include <stdlib.h>

     int main()
     {
        int gdriver = DETECT, gmode;

        initgraph(&gdriver, &gmode, "");

        setwritemode(XOR_PUT);

        line(0, 0, 100, 100);
        getch();

        getch();
        closegraph();
        return 0;
     }

See Also: linerel() putimage() line() lineto()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson